package org.sword.wechat4j.pay.protocol.refund;

import javax.xml.bind.annotation.XmlRootElement;

import org.sword.wechat4j.pay.protocol.PayRequest;

/**
 * 申请退款请求对象
 * <p>
 * 参考<a href="https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_4">开发文档
 * </p>
 * <p/>
 * Created by xuwen on 2015-12-10.
 */
@XmlRootElement(name = "xml")
public class RefundRequest extends PayRequest {

	private String device_info;
	private String nonce_str;
	private String sign;
	private String transaction_id;
	private String out_trade_no;
	private String out_refund_no;
	private int total_fee;
	private int refund_fee;
	private String refund_fee_type = "CNY";
	private String op_user_id;

	public RefundRequest(String appid, String mch_id, String mchKey) {
		super(appid, mch_id, mchKey);
	}

	public String getDevice_info() {
		return device_info;
	}

	public void setDevice_info(String device_info) {
		this.device_info = device_info;
	}

	public String getNonce_str() {
		return nonce_str;
	}

	public void setNonce_str(String nonce_str) {
		this.nonce_str = nonce_str;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public String getTransaction_id() {
		return transaction_id;
	}

	public void setTransaction_id(String transaction_id) {
		this.transaction_id = transaction_id;
	}

	public String getOut_trade_no() {
		return out_trade_no;
	}

	public void setOut_trade_no(String out_trade_no) {
		this.out_trade_no = out_trade_no;
	}

	public String getOut_refund_no() {
		return out_refund_no;
	}

	public void setOut_refund_no(String out_refund_no) {
		this.out_refund_no = out_refund_no;
	}

	public int getTotal_fee() {
		return total_fee;
	}

	public void setTotal_fee(int total_fee) {
		this.total_fee = total_fee;
	}

	public int getRefund_fee() {
		return refund_fee;
	}

	public void setRefund_fee(int refund_fee) {
		this.refund_fee = refund_fee;
	}

	public String getRefund_fee_type() {
		return refund_fee_type;
	}

	public void setRefund_fee_type(String refund_fee_type) {
		this.refund_fee_type = refund_fee_type;
	}

	public String getOp_user_id() {
		return op_user_id;
	}

	public void setOp_user_id(String op_user_id) {
		this.op_user_id = op_user_id;
	}

	@Override
	public String toString() {
		return "RefundRequest{" + "appid='" + appid + '\'' + ", mch_id='" + mch_id + '\'' + ", device_info='" + device_info + '\'' + ", nonce_str='" + nonce_str + '\'' + ", sign='"
			+ sign + '\'' + ", transaction_id='" + transaction_id + '\'' + ", out_trade_no='" + out_trade_no + '\'' + ", out_refund_no='" + out_refund_no + '\'' + ", total_fee="
			+ total_fee + ", refund_fee=" + refund_fee + ", refund_fee_type='" + refund_fee_type + '\'' + ", op_user_id='" + op_user_id + '\'' + '}';
	}
}
